<template>
  <div class="home">
    <div class="container">
      <header class="header">
        <h1 class="title">AI Agent 应用中心</h1>
        <p class="subtitle">选择您想要使用的AI应用</p>
      </header>

      <div class="app-grid">
        <div class="app-card" @click="navigateToApp('/love-app')">
          <div class="app-icon love-app">
            <svg viewBox="0 0 24 24" fill="currentColor">
              <path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/>
            </svg>
          </div>
          <h3 class="app-title">AI 恋爱大师</h3>
          <p class="app-description">专业的恋爱咨询和情感指导助手，帮您解决情感问题</p>
          <div class="app-features">
            <span class="feature-tag">情感咨询</span>
            <span class="feature-tag">恋爱指导</span>
            <span class="feature-tag">关系建议</span>
          </div>
        </div>

        <div class="app-card" @click="navigateToApp('/manus-app')">
          <div class="app-icon manus-app">
            <svg viewBox="0 0 24 24" fill="currentColor">
              <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/>
            </svg>
          </div>
          <h3 class="app-title">AI 超级智能体</h3>
          <p class="app-description">强大的多功能AI助手，可以处理各种复杂任务和问题</p>
          <div class="app-features">
            <span class="feature-tag">智能问答</span>
            <span class="feature-tag">任务处理</span>
            <span class="feature-tag">多领域专家</span>
          </div>
        </div>
      </div>

      <footer class="footer">
        <p>&copy; 2024 AI Agent Frontend. 基于 Vue3 构建</p>
      </footer>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Home',
  methods: {
    navigateToApp(path) {
      this.$router.push(path)
    }
  }
}
</script>

<style scoped>
.home {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.container {
  max-width: 1200px;
  width: 100%;
}

.header {
  text-align: center;
  margin-bottom: 60px;
  color: white;
}

.title {
  font-size: 3.5rem;
  font-weight: 700;
  margin: 0 0 20px 0;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
  font-size: 1.3rem;
  margin: 0;
  opacity: 0.9;
  font-weight: 300;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 40px;
  margin-bottom: 60px;
}

.app-card {
  background: white;
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  position: relative;
  overflow: hidden;
}

.app-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2);
}

.app-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.app-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.app-icon.love-app {
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

.app-icon.manus-app {
  background: linear-gradient(135deg, #4834d4, #686de0);
}

.app-icon svg {
  width: 40px;
  height: 40px;
}

.app-title {
  font-size: 1.8rem;
  font-weight: 600;
  margin: 0 0 20px 0;
  color: #2c3e50;
}

.app-description {
  font-size: 1.1rem;
  color: #7f8c8d;
  line-height: 1.6;
  margin: 0 0 30px 0;
}

.app-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.feature-tag {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

.footer {
  text-align: center;
  color: white;
  opacity: 0.8;
}

.footer p {
  margin: 0;
  font-size: 1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .home {
    padding: 15px;
  }
  
  .title {
    font-size: 2.5rem;
  }
  
  .subtitle {
    font-size: 1.1rem;
  }
  
  .app-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 40px;
  }
  
  .app-card {
    padding: 30px 20px;
  }
  
  .app-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
  }
  
  .app-icon svg {
    width: 30px;
    height: 30px;
  }
  
  .app-title {
    font-size: 1.5rem;
  }
  
  .app-description {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .title {
    font-size: 2rem;
  }
  
  .app-card {
    padding: 25px 15px;
  }
  
  .app-features {
    gap: 8px;
  }
  
  .feature-tag {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}
</style>
